interface Car {
    String driver();
}

class Benz implements Car {
    @Override
    public String driver() {
        return "开奔驰";
    }
}

class Audi implements Car {
    @Override
    public String driver() {
        return "开奥迪";
    }
}

class Bmw implements Car {
    @Override
    public String driver() {
        return "开宝马";
    }
}

class CarFactory {
    public static Car getBenzCar() {
        return new Benz();
    }

    public static Car getAudiCar() {
        return new Audi();
    }

    public static Car getBmwCar() {
        return new Bmw();
    }
}

// 老板聘用多个司机来开不同车(奔驰/奥迪)
public class FactoryMethodTest {

    static public void test(Car car) {
        System.out.printf("老板叫司机%s去见客户!\n", car.driver());
    }

    static public void main(String [] args) {
        test(CarFactory.getBenzCar());
        test(CarFactory.getBmwCar());
        test(CarFactory.getAudiCar());
    }
}
